package cn.edu.sjtu.se.peakfactory.dao.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.edu.sjtu.se.lchang.socialnetwork.dao.bean.User;

@Entity
@Table(name = "PEAK_FACTORY_USER_ELEMENT_TABLE")
public class UserElement {
	private Long id;
	private User user;
	private Element element;
	private Integer eleCount;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name = "ELEMENT_ID")
	public Element getElement() {
		return element;
	}

	public void setElement(Element element) {
		this.element = element;
	}

	@Column(name = "ELEMENT_COUNT")
	public Integer getEleCount() {
		return eleCount;
	}

	public void setEleCount(Integer eleCount) {
		this.eleCount = eleCount;
	}

	
	 

}
